SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwrLiquidaciones
AS
SELECT     dbo.tb_Liquidaciones.idLiquidacion AS ID, dbo.tb_Organizaciones.Nombre + ' - ' + dbo.tb_Liquidaciones.Descripcion AS Descripcion
FROM         dbo.tb_Liquidaciones INNER JOIN
                      dbo.tb_Organizaciones ON dbo.tb_Liquidaciones.Organizacion = dbo.tb_Organizaciones.idOrganizaciones
WHERE Hasta = (SELECT CONVERT(DATETIME, Valor1) FROM tb_Parametros WHERE Parametro = 'FechaFiltroDeLiquidacion')






GO
GRANT SELECT ON  [dbo].[vwrLiquidaciones] TO [CentroDeDesignaciones]
GRANT SELECT ON  [dbo].[vwrLiquidaciones] TO [CertificacionesServicios]
GRANT SELECT ON  [dbo].[vwrLiquidaciones] TO [Liquidaciones]
GRANT SELECT ON  [dbo].[vwrLiquidaciones] TO [PersonalDocente]
GRANT SELECT ON  [dbo].[vwrLiquidaciones] TO [SoloVer]
GRANT SELECT ON  [dbo].[vwrLiquidaciones] TO [Subsidios]
GO
